<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>ES Modules 特性</title>
</head>

<body>
  <script type='module'>
    console.log(this)// undefined
  </script>

  <script type='module'>
    var a = 1;
    console.log(a)// 1
  </script>
  <script type='module'>
    console.log(a)// 报错
  </script>

  <!-- 不支持支持CORS访问 -->
  <script type='module' src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
  <!-- 支持CORS访问 -->
  <script type='module' src="https://unpkg.com/jquery@3.4.1/dist/jquery.min.js"></script>

  <script type='module'>
    alert('this is alert');
  </script>
  <!-- 延时执行 -->
  <p>xxxxxxxxx</p>
</body>

</html>